﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<script type="text/javascript">
    $(document).ready(function () {
        $("#cimg a:first").css("display", "block");
        $('#cimg').nivoSlider({ posControlNav: ".pcrgh" });
    });
</script>
<div class="banner">
    <div class="cimg" id="cimg">
        <% List<Advertising> listBanner = (List<Advertising>)ViewData["MasterBanner"];
           if (listBanner.Count > 0)
           {
               foreach (Advertising item in listBanner)
               {
                   string link = string.Empty;
                   if (item.IsIntenalLink)
                   {
                       link = "<a href='" + FRouter._("quangcao", item.ID.ToString(), item.Title) + "' >";
                   }
                   else
                   {
                       link = "<a href='" + item.ExternalLink + "' target='_blank' >";
                   }
                   string image = item.Image;
                   if (string.IsNullOrEmpty(image))
                   {
                       image = "NoImage.jpg";
                   }
                   link += "<img width='718' height='219' src='" + Constants.UPLOAD_ADV_IMAGE_PATH + image + "' /></a>";

                   Response.Write(link);
               }
           }%>
    </div>
    <div class="pimg">
        <div class="pclft">
            Hãy tận dụng <span class="tsv">thegiaitri</span> để có lợi nhất</div>
        <div class="pcrgh">
        </div>
    </div>
</div>
